﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmListCompras.aspx.cs" Inherits="WEB.frmListCompras" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="col-md-12">
 <div class="panel panel-primary">
        <div class="panel-heading">
             <div class="row col-sm-12">
                        <div class="col-md-9">
                          <label style="color:black">
                            <h3>Listado de Compras</h3>
                          </label> 
                        </div>
                <div class="col-md-3">
                    <a href="frmCompras.aspx?acc=new" class="btn btn-default">Nueva Compra</a>
                </div>
            </div>
        </div>
        <div class="panel-body">

          <nav class="navbar navbar-default">
                    <div class="container">
                        <div class="form-group">
                            <div class="row col-lg-12">
                                <div class="col-md-10">

                                    <label>Criterio</label>
                                    <asp:TextBox CssClass="form-control input-sm" ID="txtCriterio" placeholder="Ingrese criterio de búsqueda" runat="server" />
                              
                                </div>
                                <div class="col-md-2">
                                    <br />
                                    <asp:Button ID="btnBuscar" Text="Buscar" CssClass="btn btn-success" runat="server"  />
                                </div>

                            </div>
                        </div>
                    </div>
                    <!-- /.container -->
            </nav>
            
            <asp:ListView runat="server" ID="lvCompras" SelectMethod="GetCompras"
                ItemType="Box.Entities.Compra">
                <EditItemTemplate>
                    <b>No Existen Compras..!!</b>
                </EditItemTemplate>
                <LayoutTemplate>
                    <table class="table table-hover table-condensed">
	       	            <thead>
	       	                <tr>
	       		                <th>#</th>
	       		                <th>PRoveedor</th>
	       		                <th>Ruc</th>
	       		                <th>Fecha</th>
                                   <th>Total</th>
                                <th>Accion</th>
	       	                </tr>
	       	            </thead>
                        <tbody>
                            <tr id="itemPlaceholder" runat="server"/>
                        </tbody>	       	            
	                </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Item.Id %></td>
                        <td><%# Item.Proveedor.NombreEmpresa %></td>
                        <td><%# Item.Proveedor.RucProvedor %></td>
                        <td><%# Item.Fecha.ToString() %></td>
                        <td><%# Item.Total %></td>
                        <td>
						<a href='frmCompras.aspx?opc=editar%id=<%# Item.Id %>'>Editar</a>
						<%--<a href='frmListVentas?opc=delete%id=<%# Item.Id %>'
							onclick='return confirm("Desea eliminar la venta?");'>Eliminar</a>--%>
					</td>
                        
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <b>No Existen Compras...</b>
                </EmptyDataTemplate>
            </asp:ListView>

                    
        </div>
        <%--Tabla para cargar datos--%>

    </div>
    </div>
   
</asp:Content>
